﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script language=javascript src="/cn/js/jquery-1.6.2.min.js"></script>
    
</head>
<body>
    <script type="text/javascript">
    <!--
        try {
            var hash = document.location.hash.substring(1);  //解析hash得到access_token值。
            //var hash = "SlAV32hkKG";
            //alert("test1");
            //alert(hash);
            var url = '/GateService/LoginGate.aspx?type=qq&op=get_openid&' + hash;
            //url = "https://api.weibo.com/2/account/get_uid.json?" + hash;
            jQuery.ajax({
                url: url,
                dataType: 'json',
                success: function (model) {
                    var openid = model.OpenID;
                    alert(openid);
                    // 这里将获取的openid作为参数传入，继续请求LoginGate.aspx页面，调用QQLoginBLL.GetUserInfo方法获取用户的昵称
                }
            });
        }
        catch (e) {
            alert("exception: " + e.Message);
        }
    //-->
    </script>
</body>
    
</html>
